﻿<%@ Page Title="Cungmuanao.com - Tạo tài khoản" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="AddUser.aspx.cs" Inherits="Admin_AddUser" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<div class="title">Tạo User Mới</div>
<div class="body">
<ul style="list-style-type: square">
   <li>
        <asp:HyperLink ID="hplManageUser" runat="server" Text="quản lý người dùng" NavigateUrl="~/Admin/ManageUser.aspx"></asp:HyperLink>
    </li>
</ul>  
<hr /> 
<p></p>
    <!-- bat Dau-->
        <asp:CreateUserWizard ID="CreateUserWizard1" runat="server" AutoGeneratePassword="false" CreateUserButtonText="Create User"
        ContinueDestinationPageUrl="~/Admin/ManageUser.aspx" FinishDestinationPageUrl="~/Admin/ManageUser.aspx">
             <WizardSteps>
         <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
           <ContentTemplate>
            <div class="sectiontitle">Create new account</div>
            <p></p>
            <table cellpadding="2">
               <tr>
                  <td style="width: 130px;" class="fieldname"><asp:Label runat="server" ID="lblUserName" AssociatedControlID="UserName" Text="Username(*):" /></td>
                  <td style="width: 300px;"><asp:TextBox runat="server" ID="UserName" Width="100%" /></td>
                  <td>
                     <asp:RequiredFieldValidator ID="valRequireUserName" runat="server" ControlToValidate="UserName" SetFocusOnError="true" Display="Dynamic"
                        ErrorMessage="Bắt Buộc Nhập Username." ToolTip="Bắt Buộc Nhập Username." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                  </td>            
               </tr>               
               <tr>
                  <td class="fieldname"><asp:Label runat="server" ID="lblPassword" AssociatedControlID="Password" Text="Password(*):" /></td>
                  <td><asp:TextBox runat="server" ID="Password" TextMode="Password" Width="100%" /></td>
                  <td>
                     <asp:RequiredFieldValidator ID="valRequirePassword" runat="server" ControlToValidate="Password" SetFocusOnError="true" Display="Dynamic"
                        ErrorMessage="Bắt Buộc Nhập Password." ToolTip="BBắt Buộc Nhập Password." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                     <asp:RegularExpressionValidator ID="valPasswordLength" runat="server" ControlToValidate="Password" SetFocusOnError="true" Display="Dynamic"
                        ValidationExpression="\w{5,}" ErrorMessage="Mật khẩu ít nhất 5 ký tự." ToolTip="Mật khẩu ít nhất 5 ký tự."
                        ValidationGroup="CreateUserWizard1">*</asp:RegularExpressionValidator>
                  </td>            
               </tr>
               <tr>
                  <td class="fieldname"><asp:Label runat="server" ID="lblConfirmPassword" AssociatedControlID="ConfirmPassword" Text="Confirm Password(*):" /></td>
                  <td><asp:TextBox runat="server" ID="ConfirmPassword" TextMode="Password" Width="100%" /></td>
                  <td>
                     <asp:RequiredFieldValidator ID="valRequireConfirmPassword" runat="server" ControlToValidate="ConfirmPassword" SetFocusOnError="true" Display="Dynamic"
                        ErrorMessage="Bắt buộc phải nhập Confirm Password." ToolTip="Bắt Buộc phải nhập Confirm Password."
                        ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                     <asp:CompareValidator ID="valComparePasswords" runat="server" ControlToCompare="Password" SetFocusOnError="true"
                        ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="Password và Confirm Password không trùng khớp."
                        ValidationGroup="CreateUserWizard1">*</asp:CompareValidator>
                  </td>            
               </tr>
               <tr>
                  <td class="fieldname"><asp:Label runat="server" ID="lblEmail" AssociatedControlID="Email" Text="E-mail(*):" /></td>
                  <td><asp:TextBox runat="server" ID="Email" Width="100%" Text='<%# Email %>' /></td>
                  <td>
                     <asp:RequiredFieldValidator ID="valRequireEmail" runat="server" ControlToValidate="Email" SetFocusOnError="true" Display="Dynamic"
                        ErrorMessage="B&#7855;t bu&#7897;c nh&#7853;p E-mail." ToolTip="B&#7855;t bu&#7897;c nh&#7853;p E-mail." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                     <asp:RegularExpressionValidator runat="server" ID="valEmailPattern"  Display="Dynamic" SetFocusOnError="true" ValidationGroup="CreateUserWizard1"
                        ControlToValidate="Email" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ErrorMessage="Email không chính xác.">*</asp:RegularExpressionValidator>
                  </td>            
               </tr>
               <tr>
                  <td colspan="3" style="text-align: right;">
                     <asp:Label ID="ErrorMessage" SkinID="FeedbackKO" runat="server" EnableViewState="False"></asp:Label>
                  </td>
               </tr>
            </table>
            <asp:ValidationSummary ValidationGroup="CreateUserWizard1" ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" />
            </ContentTemplate>
         </asp:CreateUserWizardStep>
         
         <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server"></asp:CompleteWizardStep>
      </WizardSteps>
      <MailDefinition
         BodyFileName="~/Admin/RegistrationMail.txt"
         From="admin@cungmuanao.com"
         Subject="cungmuanao.com : your new account">
      </MailDefinition>
        </asp:CreateUserWizard>
    <!-- / Bat dau -->
 </div>
 <div class="bottom"></div>
 </asp:Content>


